# -*- coding: utf-8 -*-


class MemcacheClientManager(object):
    def __init__(self, client):
        self.client = client

    def cache_page(self, http_method):
        def new_http_method(this):
            result = self.client.get('x')
            if result is None:
                print 'not found'
                result = method(this)
                self.client.set('x', result)
            else:
                print 'found'
            return result
        return new_http_method

